<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title> </title>
 </head>
 <body>
<div style="float:left;">
 <include file="admin_left" />
</div>

 <div style="float:left;margin-left:100px;" class="main">
<div class="content">
<div class="title">添加数据 [ <a href="__URL__">返回列表</a> ]</div>
<div id="result" class="result none"></div>
<script type="text/javascript" charset="utf-8" src="{:C('C_PUBLIC_PATH')}__PUBLIC__/Js/editor/kindeditor.js"></script> 
<script language="javascript" src="{:C('C_PUBLIC_PATH')}__PUBLIC__/Js/jquery.js"></script>


<script type="text/javascript">
var url = '__URL__';
</script>


<script type="text/javascript"> 
$(document).ready(function(){
    
    
    $('.addtag').click(function(){
        
        
               var remark = jQuery(this).attr('mark');
               
               var xcontent = jQuery('#taglist').val();
               
               
               if(xcontent.indexOf(remark)> -1){
               }else{
               
               
            xcontent = xcontent + ""+remark+",";
             jQuery('#taglist').val(xcontent);
             
         }
        
        
        });

   

    


    });


  
</script> 


<script  type="text/javascript">




function chatag(){
    
    var tags=jQuery("#tag").val();
    
     jQuery.ajax({
		type: "POST",
		url: "__URL__/chatag",
        data : {
    tags : tags
},
        dataType: "html",
		success: function(msg){

        //jQuery('#content_content').html(msg);
        
        if(msg == 'ok'){
            
            var xcontent = jQuery('#taglist').val();
            xcontent = xcontent + ""+tags+",";
             jQuery('#taglist').val(xcontent);
            
            
            
        }else{
            alert(msg);
        }


								}
				});
     
    
}
</script>


<script type="text/javascript"> 
    KE.show({ 
        id : 'content_1' //TEXTAREA输入框的ID 
   }); 
</script> 

 
<form method='post' id="form1" name="form1" action="__URL__/update"  enctype="multipart/form-data">
<input type="hidden" class="huge bLeftRequire" name="id" value="{$vo.id}">
<table cellpadding=3 cellspacing=3 >
<tr>
	<td class="tRight" width="10%">标题：</td>
	<td class="tLeft" ><input type="text" class="huge bLeftRequire" name="title" value="{$vo.title}" ></td>
</tr>
<tr>
	<td class="tRight" width="10%">是否反转：</td>
	<td class="tLeft" ><input type="radio" <if condition="$vo.fan == 1"> checked=checked </if>  class="huge bLeftRequire" name="fan" value="1">反转  <input type="radio" <if condition="$vo.fan == 0"> checked=checked </if> class="huge bLeftRequire" name="fan" value="0">不反转</td>
</tr>


<tr>
	<td class="tRight" width="10%">标签：</td>
	<td class="tLeft" ><input  type="text" class="huge bLeftRequire" name="tag" id ="tag"><input type="button" value="插入标签" onclick="chatag();" /></td>
</tr>

<tr>
	<td class="tRight" width="10%">标签列表：</td>
	<td class="tLeft" >
    <input type="text" id="taglist" name="taglist" style="width:500px;" value = "{$ttn}"   />
    
    </td>
</tr>

<tr>
	<td class="tRight" width="10%">已有标签：</td>
	<td class="tLeft" >
    <div id="oldlist">
    
      {$tgg}
    
    </div>
    
    </td>
</tr>


<tr>
	<td class="tRight" width="10%">描述：</td>
	<td class="tLeft" ><textarea id="desc"  name="desc" style="width:400px;height:100px;">{$vo.desc}</textarea></td>
</tr>
<tr>
	<td class="tRight" width="10%">分类：</td>
	<td class="tLeft" >
    <select id="tid" name="tid">
<volist name="list" id="vo1">
        <option value="{$vo1.id}"     
        
        <if condition="$vo1.id == $ss"> selected="selected" </if>  
        
        
        
        >{$vo1.name}
        
        
        
        </option>


        



       
</volist>
 
      </select>
    </td>
</tr>
<tr> 
	<td class="tRight tTop">缩略图</td>
	<td class="tLeft"><input name="upfile" id="upfile" type="file"  /></td>
</tr>
<tr> 
	<td class="tRight tTop"></td>
	<td class="tLeft">
    <img src="{:C('C_PUBLIC_PATH')}__PUBLIC__/Uploads/{$vo.pic}" />
    </td>
</tr>
<tr> 
	<td class="tRight tTop">内容：</td>
	<td class="tLeft"><textarea id="content_1" name="content" style="width:770px;height:300px;">{$vo.content}</textarea>	</td>
</tr>
     
<tr>
	<td></td>
	<td class="center"><div style="width:85%;margin:5px">
	<input type="submit" value="保 存"  class="button small"> <input type="reset" class="button small" onclick="resetEditor()" value="重 置" > 
	</div></td>
</tr>
</form>
</table>
</div>
</div>
 </body>
</html>
